#############################################################
Steps for Driver Installation for SmartPQI Controller: 
#############################################################

1) Once the FreeBSD OS is installed on the on-board drive, install the Smartpqi package. 

	# pkg add smartpqi10x-amd64.txz
	
	Note: Upgrade the Package if already exists.
	
	# pkg upgrade smartpqi10x-amd64.txz

2) Check whether the package is installed or not. 

	# pkg info

3) Reboot  

	Note:	If OS needs to be installed on USB flash/thumb drive, ensure that drive is connected to 
		first USB port/slot. After installation, once OS boots add the following entries in
		/boot/device.hints before installing smartpqi package.

		hint.scbus.0.at="umass-sim0"
		hint.da.0.at="scbus0"

########################################################################################### 
Steps for FreeBSD OS Installation on Drive Connected to SmartPQI Controller: 
###########################################################################################
 

1) Copy the driver module ( smartpqi.ko ) to a USB key. 
	Disk partition the USB key, using gpart on a unix system. 
	For eg: 
	# gpart create -s GPT da1
	# gpart add -t freebsd-ufs da1 
	# newfs /dev/da1p1 
	# mount /dev/da1p1 /mnt
	# cp smartpqi.ko /mnt

	Note: For legacy BIOS mode installation, use MBR partitioning structure (For eg: FAT32)
	to partition the USB key. For UEFI Mode, use GPT partitioning structure as above.

2) Connect the CD/DVD drive, USB key which contains driver module and the SmartPQI controller with hard drive/array. 

3) Insert the FreeBSD Installation disk into CD/DVD drive & boot from it. 

4) At FreeBSD boot menu press Escape for boot loader prompt. 

5) Perform the following steps at boot loader prompt. 
	
	a) See all present modules by executing following command. 
		# lsmod 
		Expected Output: It will show all the present modules. 

	b) unload the kernel module 
		# unload 
 
	c) Check kernel is unloaded or not 
		# lsmod 
		Expected Output: It will not show any module. 

	d) Check whether USB key is detected or not. 
		# lsdev 
		Expected Output: 
		part 0: .. (removable) 
		part 1: .. (removable) 
		part 2: .. (removable) 

	e) Load the kernel from the CD/DVD boot media
		# load /boot/kernel/kernel

	f) Load the driver module 
		# load part< USB key location >:smartpqi.ko 
		Example: 
		# load part2:smartpqi.ko 

	g) Continue the Installation procedure, type the following command & Enter. 
		# boot 

	h) After installing the kernel and before rebooting, add this driver to the new system
                Choose "YES" when it prompts for the manual configuration similar to below text.
		"The installation is now finished.  Before exiting the installer, 
		would you like to open a shell in the new system to make any final manual 
		modifications? 

                Mount the USB key:
                # mount /dev/da1p1 /media
                Copy the driver to the boot directory
                # cp /media/smartpqi.ko /boot/modules/smartpqi.ko
                Make sure it loads
                # vi /boot/loader.conf
                Add the following line:
                smartpqi_load="YES"
                # reboot

6) If system halts at below point: 
	# mountroot> 

7) Check for the boot partition 
	# mountroot> ? 

8) Mostly boot partition is present in P2 so: 
	# mountroot> ufs:/dev/<da0p2> 

########################################################################################### 
Steps for driver package installation/upgradation of SmartPQI Controller: 
###########################################################################################
1) Install the Smartpqi package. 

 	# pkg add smartpqi10x-amd64.txz
	
	Note: Upgrade the Package if already exists.
	
	# pkg upgrade smartpqi10x-amd64.txz

2) Check whether the package is installed or not. 

	# pkg info

3) Reboot  
